package com.example.li_han.pojo;

/**
 * 新闻分类实体类
 */
public class NewsType {
    private int typeId;        // 类别编号（主键，自增）
    private String typeName;   // 类别名称
    private int sortOrder;     // 排序

    // 无参构造
    public NewsType() {}

    // 全参构造
    public NewsType(int typeId, String typeName, int sortOrder) {
        this.typeId = typeId;
        this.typeName = typeName;
        this.sortOrder = sortOrder;
    }

    // Getter和Setter方法
    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public int getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(int sortOrder) {
        this.sortOrder = sortOrder;
    }

    @Override
    public String toString() {
        return "NewsType{" +
                "typeId=" + typeId +
                ", typeName='" + typeName + '\'' +
                ", sortOrder=" + sortOrder +
                '}';
    }
}